<template>
	<view class="list-main"  @click.stop="goLineInfo(lineInfo.lineId)">
	    <view class="display-flex-column">
			<view class="line-sn">
				{{lineInfo.lineSn}}
			</view>
			<view class="row" style="margin-bottom: 15px;">
				<view class="display-flex-column">
					<view class="row-center">
						<view class="station_dot station_dot_start">
						</view>
						<view class="od-item">
							{{lineInfo.origin}}
						</view>
					</view>
					
					<view class="shu-line" style="margin: 0 20px;">
						
					</view>
					
					<view class="row-center">
						<view class="station_dot station_dot_end">
						</view>
						<view class="od-item">
							{{lineInfo.destination}}
						</view>
					</view>
					<view v-if="lineInfo.companyName" class="row-center" style="color: #c8c8c8;font-size: 12px; margin: 8px 15px 0 15px;">
					    <text class="iconfont icon-qichebanci" style="margin-right: 5px;font-size: 16px;" ></text>
						<view class="">
						     {{lineInfo.companyName}}
						</view>
					</view>
				</view>
				<view class="ticket-item">
					<view class="buy-ticket-button line-ellipsis">
						￥{{lineInfo.discountPrice?lineInfo.discountPrice:lineInfo.price}}起购
					</view>
				</view>
			</view>

		</view>
	</view>
	
</template>

<script>
	export default {
		props:{
			lineInfo: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {};
		},
		mounted(){
		},
		methods: {
			goLineInfo:function(line_id){
				// var date =  _formatDate("yyyy-MM-dd")
				// uni.navigateTo({
				// 	url:'/pages/bus/regular_list/index?line_id='+line_id+'&date='+date
				// })
				uni.navigateTo({
					url:'/pages/bus/line_info/index?line_id='+line_id
				})
			},
		}
	}
</script>

<style lang="scss">
	.list-main{
		position: relative;
		margin: 12rpx 24rpx;
		background-color: #fff;
		border-radius: 4px;
	}
	
	.line-sn {
		font-size: 15px;
		font-weight: 600;
		color: #000000;
		margin: 8px 10px;
	}
	.od-item{
		color: #888;
		font-size: 12px;
	}
	
	.ticket-item {
		margin-left: auto;
		margin-right: 20px;
	}
</style>